const reomte_url='172.21.213.174:8080';
module.exports = {
    publicPath: './',
    devServer: {
        host: 'localhost',
        proxy:{
            //配置跨域
            '/api':{
                target:'http://localhost:8899',
                ws:true,
                timeout:3600000,
                changOrigin:true,
                pathRewrite:{
                    '^/api':'',
                }
            },
            '/pub':{
                target:'http://111.229.14.128:8895',
                ws:true,
                timeout:600000,
                changOrigin:true,
                pathRewrite:{
                    '^/pub':'',
                }
            },
            //发布数据公开页面
            '/portal':{
                target:reomte_url.remote_test_url,
                ws:true,
                timeout:600000,
                changOrigin:true,
                pathRewrite:{
                    '^/portal':'',
                }
            },
            //
            '/my':{
                target:'http://223.2.38.183:8080',
                ws:true,
                timeout:600000,
                changOrigin:true,
                pathRewrite:{
                    '^/my':'/',
                }
            },
            //参与式平台
            '/geops':{
                target:reomte_url.remote_test_url,
                ws:true,
                timeout:600000,
                changOrigin:true,
                pathRewrite:{
                    '^/geops':'',
                }
            },
            '/amap':{
                target:reomte_url.remote_test_url,
                ws:true,
                timeout:600000,
                changOrigin:true,
                pathRewrite:{
                    '^/geops':'',
                }
            },

            '/th':{
                target:'http://172.21.213.4:1708',
                ws:true,
                timeout:600000,
                changOrigin:true,
                pathRewrite:{
                    '^/th':'',
                }
            },
            //测试
            //参与式平台
            '/test':{
                target:'http://172.21.213.4:1708',
                ws:true,
                timeout:600000,
                changOrigin:true,
                pathRewrite:{
                    '^/test':'',
                }
            },
            '/uploadLarge':{
                target:'http://localhost:8899',
                ws:true,
                timeout:600000,
                changOrigin:true,
                pathRewrite:{
                    '^/uploadLarge':'',
                }
            },
            '/template':{
                target:'https://geomodeling.njnu.edu.cn/repository',
                ws:true,
                timeout:600000,
                changOrigin:true,
                pathRewrite:{
                    '^/template':'',
                }
            },
        }
    },
    configureWebpack: {
        devtool: "inline-source-map",
        module: {
            rules: [
                {
                    test: /\.mjs$/,
                    include: /node_modules/,
                    type: "javascript/auto"
                },
            ]
        }
    },
    css: {
        extract: false
    },
   
};
